Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: set up gen ai inference attributes for foundational text models #111

Merged
merged 10 commits into from
Nov 1, 2024

Conversation

yiyuan-he
Copy link
Contributor

Description of changes:
Adding auto-instrumentation support for GenAI inference parameters.

The following foundational text models are supported:

  • AI21 Jamba
  • Amazon Titan
  • Anthropic Claude
  • Cohere Command
  • Meta Llama
  • Mistral AI

Full list can be found here. Note, we do not support Stability AI models at this time since they are focused on text to image.

New inference parameter attributes added according to OpenTelemetry Semantic Conventions for GenAI attributes:

  • gen_ai.request.max_tokens
  • gen_ai.request.temperature
  • gen_ai.request.top_p
  • gen_ai.response.finish_reasons
  • gen_ai.usage.input_tokens
  • gen_ai.usage.output_tokens

Test Plan:
Set up sample app to make Bedrock Runtime InvokeModel API calls to the supported foundational models and verified the auto-instrumentation attributes.

ai21-jamba
amazon-titan
anthropic-claude
cohere-command
meta-llama
mistral-ai

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@yiyuan-he yiyuan-he requested a review from a team as a code owner October 29, 2024 19:08
@yiyuan-he yiyuan-he changed the title feat: set up gen ai inference attributes for foundational text models feat: set up gen ai inference attributes for foundational text models [not ready] Oct 29, 2024
@yiyuan-he yiyuan-he changed the title feat: set up gen ai inference attributes for foundational text models [not ready] feat: set up gen ai inference attributes for foundational text models Oct 30, 2024
@yiyuan-he yiyuan-he merged commit e8c96ae into aws-observability:main Nov 1, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants